//start
Hs.HSSubWin = function(path, parent) {
	var createXhrObject = function() {
		var http;
		var activeX = [ "MSXML2.XMLHTTP.6.0", "MSXML2.XMLHTTP.5.0",
				"MSXML2.XMLHTTP.4.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP",
				"Microsoft.XMLHTTP" ];

		try {
			http = new XMLHttpRequest();
		} catch (e) {
			for ( var i = 0; i < activeX.length; ++i) {
				try {
					http = new ActiveXObject(activeX[i]);
					break;
				} catch (e) {
				}
			}
		} finally {
			return http;
		}
	};
	var getRemoteMW = function(path, parent) {
		var obj = null;
		var conn = createXhrObject();
		if (!conn)
			throw new Error("create XMLHttpRequest error!");
		else {
			//打开连接 ,如果open()的第三个参数为false，send()方法是同步的
			conn.open("POST", path, false);
			// 设置http header
			conn.setRequestHeader("Content-Type",
					"application/x-www-form-urlencoded;charset=UTF-8");
			conn.setRequestHeader("X-Requested-With", "XMLHttpRequest");
			// send
			conn.send();
			// 发送成功200
			if (conn.status == "200") {
				if (conn.responseText != '') {
					try {
					   eval(conn.responseText);	
                         
					} catch (e) {

					}

				}
			}
		}
	};
	if (path.substring(0, 4) != "http") {
		path = window._jres_contextPath + "/" + path;
	}
	getRemoteMW(path,parent);

}
//end		
   var ajaxTimeout = ${ajaxTimeout} ;
     function $_subDicts(){
    	var $_dicts = {};
	    %dicts%
	   	 return $_dicts;
	   
	 }
	 ﻿var $MainWin = null;   //20111128增加，用于解决eval后MainWin作用域的问题
	 Ext.apply($_dicts,$_subDicts());
	 ${script?default("")}
	 ${itemScript?default("")}
	 ${item?default("")}
	 ${event?default("")}
	 this.MainWin=MainWin;	
	 $MainWin = this.MainWin;   //20111128增加，用于解决eval后MainWin作用域的问题
